package com.newtouch.cq.lang.em;


import com.newtouch.cq.lang.exception.IMccExceptionInfo;
import lombok.Getter;

/**
 * 业务异常枚举
 *
 * @author Alex
 */
@Getter
public enum BaseExceptionEnum implements IMccExceptionInfo<String> {

    //-----------------------------------通用-------------------------------------------
    SUCCESS("000000000000","操作成功"),
    FAIL("000000000001","失败"),
    ERROR("999999999999","未知错误"),
    ACCREDIT_INVALID_OVERDUE("A001M0000001","用户未登录或登录过期"),
    MISSING_PARAMETER("A001M0000002","缺失必传参数"),
    QUERY_NO_DATA("A001M0000003","查询无数据"),
    INSUFFICIENT_PERMISSIONS("A001M0000004","权限不足"),


    VERIFICATION_CODE_NO_NULL("A001M0010001","验证码不能为空"),
    VERIFICATION_CODE_ERROR_INVALID("A001M0010002","验证码错误或失效"),
    PHONE_NO_NULL("A001M0010003","手机号不能为空"),
    PHONE_FORMAT_ERROR("A001M0010004","手机号格式错误"),
    PASSWORD_FORMAT_ERROR("A001M0010005","密码格式错误"),
    ACCOUNT_FORMAT_ERROR("A001M0010006","账号不能为空"),
    PASSWORD_NO_NULL("A001M0010007","密码不能为空"),
    ACCOUNT_PASSWORD_ERROR("A001M0010009","账号或密码错误"),
    ACCOUNT_DISABLE("A001M0010010","账户被禁用,请联系管理员"),

    OLDPASSWORD_NEWPASSWORD_NO_NULL("A001M0020001","原密码和新密码不能为空"),
    OLDPASSWORD_NEWPASSWORD_NO_ALIKE("A001M0020002","原密码和新密码不能一致");

    private String code;

    private String message;

    BaseExceptionEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }


}
